<?php

namespace App\Services\Api;

use EasyWeChat\Factory;

class EasyWeChatService
{
     public static function easy_app(){
         $config = [
             'app_id' => config('wechat.wx_appid'),
             'secret' => config('wechat.wx_appsecret'),
             // 下面为可选项
             // 指定 API 调用返回结果的类型：array(default)/collection/object/raw/自定义类名
             'response_type' => 'array',

             'log' => [
                 'level' => 'debug',
                 'file' => __DIR__.'/wechat.log',
             ],
         ];
            //dd($config);
         return Factory::miniProgram($config);
     }
}